<?php

require '../conn.php';

require 'config.php';

require '../inc/function.php';

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<title></title>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<link rel="stylesheet" href="../css/admin.css" type="text/css" />

<script type="text/javascript" src="inc/function.js"></script>

<script type="text/javascript" src="../fy_ckeditor/ckeditor.js"></script>

</head>

<body>

<?php

if ($act=='modify'){

	$s_name=ReStra($_POST['s_name']);

	$s_domain=ReStra($_POST['s_domain']);
	$s_email=ReStra($_POST['s_email']);

	$s_keyword=ReStra($_POST['s_keyword']);

	$s_description=ReStra($_POST['s_description']);

	$s_copyright=ReStra($_POST['s_copyright']);

 
	$s_tel=ReStra($_POST['s_tel']);
	$s_tel2=ReStra($_POST['s_tel2']);
	$s_address=ReStra($_POST['s_address']);

	$s_fax=ReStra($_POST['s_fax']);

	$s_weibo=ReStra($_POST['s_weibo']);
	$s_qq=ReStra($_POST['s_qq']);



 	$s_tdc=ReStra($_POST['s_tdc']);
  
	$s_logo=ReStra($_POST['s_logo']);
	$s_dilogo=ReStra($_POST['s_dilogo']);

  
 
	$s_soc2=$_POST['s_soc2'];

	$s_soc2_code=ReStra($_POST['s_soc2_code']);

	$s_stat=$_POST['s_stat'];

	$s_stat_code=ReStra($_POST['s_stat_code']);

	$sql="update ".$language."_config set 

	s_name='$s_name',

	s_keyword='$s_keyword',

	s_description='$s_description',

	s_domain='$s_domain',

	s_copyright='$s_copyright',
	s_company='$s_company',

 	s_tel='$s_tel',
 	s_tel2='$s_tel2',

 	s_email='$s_email',

 	s_address='$s_address',
 	s_fax='$s_fax',

 	s_weibo='$s_weibo',
 	s_qq='$s_qq',

 
	s_tdc='$s_tdc',
 
	s_logo='$s_logo',
	s_dilogo='$s_dilogo',
  	
 	s_soc2=$s_soc2,

	s_soc2_code='$s_soc2_code',

	s_stat=$s_stat,

	s_stat_code='$s_stat_code'

	 where s_id=1";

	mysql_query($sql) or die(mysql_error($sql));

	Msg('','');

}

$query=mysql_query('select * from '.$language.'_config where s_id=1',$conn);

$row=mysql_fetch_array($query);

?>

<div id="container">

	<div class="edit">

		<h1>网站配置<a href="javascript:location.reload();">刷新</a></h1>

		<form name="form1" method="post" action="?act=modify">

	    <table width="100%" border="0" cellpadding="0" cellspacing="0">

        <tr>

		    <td class="edit_title" style="line-height:20px;"><strong>网站信息：</strong></td>

       		<td>&nbsp;</td>

       	</tr>



   	  	<tr>

			<td class="edit_title">网站名称：</td>

			<td><input type="text" name="s_name" class="inputtext" value="<?php echo $row['s_name'] ?>" maxlength="255" style="width:98%;" /></td>

        </tr>

 
        <tr>

          <td class="edit_title">关 键 字：</td>

          <td><textarea name="s_keyword" class="inputarea"><?php echo $row['s_keyword'] ?></textarea></td>

      	</tr>

        <tr>

          <td class="edit_title">描述信息：</td>

          <td><textarea name="s_description" class="inputarea"><?php echo $row['s_description'] ?></textarea></td>

      	</tr>
        
        

		<tr>

		  <td class="edit_title">底部信息：</td>

          <td><div id="edit_content"><textarea name="s_copyright" class="ckeditor"><?php echo $row['s_copyright'] ?></textarea></div></td>

        </tr>


           
	      <tr>

          <td class="edit_title">网站域名：</td>

        			<td><input type="text" name="s_domain" class="inputtext" value="<?php echo $row['s_domain'] ?>" maxlength="255" style="width:98%;" /></td>

 
      	</tr>
		<tr>

            <td class="edit_title">网站logo：</td>

            <td><input type="text" name="s_logo" id="s_logo" class="inputtext" value="<?php echo $row['s_logo'] ?>" size="50" maxlength="50" readonly="readonly" />
            &nbsp;(图片尺寸：240x70)
            <iframe src="../upload_fy.php?file_type=0&file_id=s_logo" frameborder="0" allowtransparency="true" scrolling="no" width="100%" height="25"></iframe></td>

        </tr>
        
        <tr>

            <td class="edit_title">底部logo：</td>

            <td><input type="text" name="s_dilogo" id="s_dilogo" class="inputtext" value="<?php echo $row['s_dilogo'] ?>" size="50" maxlength="50" readonly="readonly" />
            &nbsp;(图片尺寸：182x53)
            <iframe src="../upload_fy.php?file_type=0&file_id=s_dilogo" frameborder="0" allowtransparency="true" scrolling="no" width="100%" height="25"></iframe></td>

        </tr>
        
        
	     
        
          <tr>

          <td class="edit_title">400电话：</td>

        			<td><input type="text" name="s_tel" class="inputtext" value="<?php echo $row['s_tel'] ?>" maxlength="255" style="width:98%;" /></td>

 
      	</tr>
         
         
         
                <tr>

          <td class="edit_title">公司地址：</td>

        <td><input type="text" name="s_address" class="inputtext" value="<?php echo $row['s_address'] ?>" maxlength="255" style="width:98%;" /></td>

 
      	</tr>
        
                 <tr>

          <td class="edit_title">电话：</td>

        <td><input type="text" name="s_tel2" class="inputtext" value="<?php echo $row['s_tel2'] ?>" maxlength="255" style="width:98%;" /></td>

 
      	</tr>
               
               
                              <tr>

          <td class="edit_title">传真：</td>

        <td><input type="text" name="s_fax" class="inputtext" value="<?php echo $row['s_fax'] ?>" maxlength="255" style="width:98%;" /></td>

 
      	</tr>
               
                <tr>

          <td class="edit_title">邮箱：</td>

        <td><input type="text" name="s_email" class="inputtext" value="<?php echo $row['s_email'] ?>" maxlength="255" style="width:98%;" /></td>

 
      	</tr>
           
                          <tr>

          <td class="edit_title">微博：</td>

        <td><input type="text" name="s_weibo" class="inputtext" value="<?php echo $row['s_weibo'] ?>" maxlength="255" style="width:98%;" /></td>

 
      	</tr>
        
                       <tr>

          <td class="edit_title">QQ：</td>

        <td><input type="text" name="s_qq" class="inputtext" value="<?php echo $row['s_qq'] ?>" maxlength="255" style="width:98%;" /></td>

 
      	</tr>
               
               
               
          
          
        
		<tr>

            <td class="edit_title">微信二维码：</td>

            <td><input type="text" name="s_tdc" id="s_tdc" class="inputtext" value="<?php echo $row['s_tdc'] ?>" size="50" maxlength="50" readonly="readonly" />&nbsp;(图片尺寸：150*150)<iframe src="../upload_fy.php?file_type=0&file_id=s_tdc" frameborder="0" allowtransparency="true" scrolling="no" width="100%" height="25"></iframe></td>

        </tr>


   
        

	 
          
           
        
        <tr>

		    <td class="edit_title" style="line-height:20px;"><strong>第三方浮动客服：</strong></td>

       		<td>&nbsp;</td>

      
        

        <tr>

        	<td class="edit_title">浮动开关：</td>

        	<td><select name="s_soc2" class="input_select"><option value="1">开</option><option value="0">关</option></select>&nbsp;<span style="color:#ff0000;">(<?php if ($row['s_soc2']==0){echo '浮动开关已关闭，前台已隐藏';}else{echo '浮动开关已打开，前台正常显示';} ?>)</span>

			<script type="text/javascript">document.form1.s_soc2.value="<?php echo $row['s_soc2'] ?>";</script></td>

      	</tr>

        <tr>

          	<td class="edit_title">客服代码：</td>

          	<td><textarea name="s_soc2_code" class="inputarea" style="margin-bottom:5px;"><?php echo $row['s_soc2_code'] ?></textarea>(在这里输入53客服，TQ客服等客服代码)</td>

        </tr>

        <tr>

		    <td class="edit_title" style="line-height:20px;"><strong>第三方流量统计：</strong></td>

       		<td>&nbsp;</td>

       	</tr>

        <tr>

        	<td class="edit_title">统计开关：</td>

        	<td><select name="s_stat" class="input_select"><option value="1">开</option><option value="0">关</option></select>&nbsp;<span style="color:#ff0000;">(<?php if ($row['s_stat']==0){echo '统计开关已关闭，前台已隐藏';}else{echo '统计开关已打开，前台正常显示';} ?>)</span>

			<script type="text/javascript">document.form1.s_stat.value="<?php echo $row['s_stat'] ?>";</script></td>

      	</tr>

        <tr>

          	<td class="edit_title">统计代码：</td>

          	<td><textarea name="s_stat_code" class="inputarea" style="margin-bottom:5px;"><?php echo $row['s_stat_code'] ?></textarea>(在这里输入CNZZ，51，百度等统计代码)</td>

        </tr>

        	<tr>

				<td class="edit_title" height="40">&nbsp;</td>

				<td><input type="submit" name="button" class="button" value="保存配置" /></td>

        	</tr>

        </table>

	</form>

	</div>

</div>
<script type="text/javascript">CKEDITOR.replace('s_copyright',{height:100});</script>

</body>

</html>